new Menu:DMcreate;

script_CustomDM_DialogResponse(playerid, dialogid, inputtext[])
{
	if(dialogid == d_cDM_weather)
	{
		if(IsNumeric(inputtext))
		{
			DMweather = strval(inputtext);
			msgF(playerid, YELLOW, "DM Weather ID: %d", strval(inputtext));
			ShowMenuForPlayer(DMcreate, playerid);
		}
	}
	if(dialogid == d_cDM_time)
	{
		if(IsNumeric(inputtext))
		{
			DMtime_H=strval(inputtext);
			DMtime_M=0;
			msgF(playerid, YELLOW, "DM Time: %d:00", strval(inputtext));
			ShowMenuForPlayer(DMcreate, playerid);
		}
	}
	return 0;
}
script_CustomDM_MenuRow(playerid, row, Menu:pMenu)
{
	if(pMenu == DMcreate)
	{
		switch(row)
		{
			case 0:
			{
				new Float:x, Float:y, Float:z;
				GetPlayerPos(playerid, x, y, z);
				CustomSpawns[0][0]=x,
				CustomSpawns[0][1]=y,
				CustomSpawns[0][2]=z;
				msgF(playerid, LGREEN, "Team 1 Spawn: %f, %f, %f", x, y, z);
				ShowMenuForPlayer(DMcreate, playerid);
			}
			case 1:
			{
				new Float:x, Float:y, Float:z;
				GetPlayerPos(playerid, x, y, z);
				CustomSpawns[1][0]=x,
				CustomSpawns[1][1]=y,
				CustomSpawns[1][2]=z;
				msgF(playerid, LGREEN, "Team 2 Spawn: %f, %f, %f", x, y, z);
				ShowMenuForPlayer(DMcreate, playerid);
			}
			case 2:ShowPlayerDialog(playerid, d_cDM_weather, DIALOG_STYLE_INPUT, "Custom DM Weather", "Enter The Weather ID", "Confirm", "");
			case 3:ShowPlayerDialog(playerid, d_cDM_time, DIALOG_STYLE_INPUT, "Custom DM Time", "Enter The Time", "Confirm", "");
			case 4:
			{
				DMmap = -2;
				DMmode = 0;
				bitTrue(bServerGlobalSettings, DMInProgress);
				bitTrue(bServerGlobalSettings, DMstarted);
				msgaF(LGREEN, "%s Has Created A Custom Deathmatch Type /joindm to join", GetName(playerid));
			}
		}
	}
}
